package Homework08;

public class CheckingAccount extends BankAccount{
    //扩展，每次存款取款都收取1美元的手续费
    public CheckingAccount(double initialBalance) {
        super(initialBalance);
    }

    @Override
    public void deposit(double amount) {
        super.deposit(amount - 1);//手续费1美元
    }

    @Override
    public void withdraw(double amount) {
        super.withdraw(amount + 1);
        //假设取10块钱，那么要多取1块钱转入银行账户
    }
}
